#include <QDebug>

#include "uniontecsystemdll.h"
#include "uniontecsystemdll_global.h"

static UnionTecSystemDLL* pUnionTecSystemDLLInstance = nullptr;

short UnionTecSystemInstanceInit(){
    if(pUnionTecSystemDLLInstance == nullptr){
        pUnionTecSystemDLLInstance = new UnionTecSystemDLL();
        return NOERROR;
    }
    return UNDERTAKE;
}

void  UnionTecSystemProgressBar(int value){
    if(pUnionTecSystemDLLInstance != nullptr){
        pUnionTecSystemDLLInstance->UnionMainWindowWriteProgressBar(value);
    }
}

void  UnionTecSystemMessageBox(MessageType Type,const QString Data){
    if(pUnionTecSystemDLLInstance != nullptr){
        pUnionTecSystemDLLInstance->UnionMainWindowWriteMessageBox(Type,Data);
    }
}

void  UnionTecSystemDebugWindowShow(){
    if(pUnionTecSystemDLLInstance != nullptr){
        pUnionTecSystemDLLInstance->UnionDebugWindowShow();
    }
}
void  UnionTecSystemDebugAdminWindowShow(){
    if(pUnionTecSystemDLLInstance != nullptr){
        pUnionTecSystemDLLInstance->UnionAdminWindowShow();
    }
}
void  UnionTecSystemDebugWindowHide(){
    if(pUnionTecSystemDLLInstance != nullptr){
        pUnionTecSystemDLLInstance->UnionDebugWindowHide();
    }
}

void  UnionTecSystemQuite(){
    if(pUnionTecSystemDLLInstance != nullptr){
        pUnionTecSystemDLLInstance->~UnionTecSystemDLL();
    }
}
